<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>
        <td><input type="text" name="keyword"></td>
        <td><input type="button" value="查找" onclick="query()"></td>
        <td><input type="button" value="新增" onclick="add()"></td>
    </div>
    <table id="tbData">
        <tr>
            <td>Id</td>
            <td>商品</td>
            <td>余额</td>
            <td>库存</td>
            <td>操作</td>
        </tr>
    </table>


    <script src="js/jquery-3.6.0.min.js"></script>
    <script src="./js/api.js"></script>
    <script src="js/init.js"></script>
    <script>
        function query(){
            let keywrod = $('[name=keyword]').val()
            getListWithkeyword(keywrod);
        }

        function add(){
            window.location.href = 'CreateOrEdit.html'
        }

        function edit(id){
            window.location.href = `CreateOrEdit.html?id=${id}`
        }
    </script>
</body>

</html>